//
//  FindDetaillTableViewCell.m
//  CwinCar
//
//  Created by dllo on 15/10/28.
//  Copyright © 2015年 dlios. All rights reserved.
//

#import "FindDetaillTableViewCell.h"

@implementation FindDetaillTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10 , 0 * suitableScreen_Width, 355 * suitableScreen_Width, 25 * suitableScreen_Width)];
        [self.contentView addSubview:self.titleLabel];
        
        self.conLabel = [[UILabel alloc]initWithFrame:CGRectMake(10 * suitableScreen_Width, 25 * suitableScreen_Width, 365 * suitableScreen_Width, 50* suitableScreen_Width)];
        [self.conLabel setNumberOfLines:0];
        [self.contentView addSubview:self.conLabel];
        [self.conLabel setAlpha:0.5];
        
        self.minPriceLabel = [[UILabel alloc]initWithFrame:CGRectMake(10 * suitableScreen_Width , 75 * suitableScreen_Width, 150 * suitableScreen_Width, 30 * suitableScreen_Width)];
        [self.minPriceLabel setTextColor:[UIColor redColor]];
        [self.contentView addSubview:self.minPriceLabel];
        
        self.stateLabel = [[UILabel alloc]initWithFrame:CGRectMake(180 * suitableScreen_Width, 75 * suitableScreen_Width, 100 * suitableScreen_Width, 30 * suitableScreen_Width)];
        [self.contentView addSubview:self.stateLabel];
        self.stateLabel.alpha = 0.5 ;
    }
    
    return self ;
}

-(void)getInfoModel:(CarDetailModel *)model{
    
    [self.titleLabel setText:model.title];
    [self.conLabel setText:model.config];
    [self.minPriceLabel setText:[NSString stringWithFormat:@"%@万起",model.minPrice]];
    [self.stateLabel setText:model.state];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
